﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetPic.aspx.cs" Inherits="CMS_Admin_GetPic" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>图片选择</title>
    <style>
        .input input
        {
            width: 200px;
            border: #000 1px solid;
        }
        .input textarea
        {
            border: #000 1px solid;
        }
        .input select
        {
            width: 150px;
            border: #000 1px solid;
        }
        #tb
        {
            font-size: 13px;
            text-align: left;
        }
        .btn
        {
            border-right: #7b9ebd 1px solid;
            padding-right: 2px;
            border-top: #7b9ebd 1px solid;
            padding-left: 2px;
            font-size: 12px;
            filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde);
            border-left: #7b9ebd 1px solid;
            cursor: hand;
            color: black;
            padding-top: 2px;
            border-bottom: #7b9ebd 1px solid;
        }
    </style>

    <script>
        function SetRb(rb) {
            var pic = document.getElementById("<%=HidPic.ClientID %>");
            var Path = document.getElementById("<%=HidPicPath.ClientID %>");

            pic.value = rb.id;
            Path.value = rb.value;


        }
        function OK() {
            var pic = document.getElementById("<%=HidPic.ClientID %>");
            var Path = document.getElementById("<%=HidPicPath.ClientID %>");
            window.opener.Get(pic.value, Path.value);
            this.close();
        }
    </script>

</head>
<body scroll="auto">
    <form id="form1" runat="server">
    <div style="text-align: left; top: 20px;">
        <input id="choose" type="button" value=" 确 认 " class="btn" style="width: 100px" onclick="OK()" />
        <input id="cancel" type="button" value=" 取 消 " class="btn" style="width: 100px" onclick=" window.close();" />
    </div>
    <asp:DataList ID="DlPic" runat="server" RepeatColumns="3">
        <ItemTemplate>
            <div style="width: 200px; text-align: center; padding: 5px">
                <img src='<%# Eval("Path") %>' width="200" height="150" />
                <br />
                <%# Eval("PicName")%>
                <br />
                <input id='<%# Eval("PicName") %>' type="radio" onclick="SetRb(this)" name="RbPic"
                    value='<%# Eval("Path") %>' />
            </div>
        </ItemTemplate>
    </asp:DataList><asp:HiddenField ID="HidPic" runat="server" />
    <asp:HiddenField ID="HidPicPath" runat="server" />
    </form>
</body>
</html>
